3.77 \(\int x^m \cos ^2(a+b x^n) \, dx\)

Optimal. Leaf size=141 \[ -\frac{e^{2 i a} 2^{-\frac{m+2 n+1}{n}} x^{m+1} \left (-i b x^n\right )^{-\frac{m+1}{n}} \text{Gamma}\left (\frac{m+1}{n},-2 i b x^n\right )}{n}-\frac{e^{-2 i a} 2^{-\frac{m+2 n+1}{n}} x^{m+1} \left (i b x^n\right )^{-\frac{m+1}{n}} \text{Gamma}\left (\frac{m+1}{n},2 i b x^n\right )}{n}+\frac{x^{m+1}}{2 (m+1)} \]

[Out]

x^(1 + m)/(2*(1 + m)) - (E^((2*I)*a)*x^(1 + m)*Gamma[(1 + m)/n, (-2*I)*b*x^n])/(2^((1 + m + 2*n)/n)*n*((-I)*b*
x^n)^((1 + m)/n)) - (x^(1 + m)*Gamma[(1 + m)/n, (2*I)*b*x^n])/(2^((1 + m + 2*n)/n)*E^((2*I)*a)*n*(I*b*x^n)^((1
 + m)/n))

________________________________________________________________________________________

Rubi [A]  time = 0.160436, antiderivative size = 141, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {3426, 3424, 2218} \[ -\frac{e^{2 i a} 2^{-\frac{m+2 n+1}{n}} x^{m+1} \left (-i b x^n\right )^{-\frac{m+1}{n}} \text{Gamma}\left (\frac{m+1}{n},-2 i b x^n\right )}{n}-\frac{e^{-2 i a} 2^{-\frac{m+2 n+1}{n}} x^{m+1} \left (i b x^n\right )^{-\frac{m+1}{n}} \text{Gamma}\left (\frac{m+1}{n},2 i b x^n\right )}{n}+\frac{x^{m+1}}{2 (m+1)} \]

Antiderivative was successfully verified.

[In]

Int[x^m*Cos[a + b*x^n]^2,x]

[Out]

x^(1 + m)/(2*(1 + m)) - (E^((2*I)*a)*x^(1 + m)*Gamma[(1 + m)/n, (-2*I)*b*x^n])/(2^((1 + m + 2*n)/n)*n*((-I)*b*
x^n)^((1 + m)/n)) - (x^(1 + m)*Gamma[(1 + m)/n, (2*I)*b*x^n])/(2^((1 + m + 2*n)/n)*E^((2*I)*a)*n*(I*b*x^n)^((1
 + m)/n))

Rule 3426

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandTrigReduce[(e
*x)^m, (a + b*Cos[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]

Rule 3424

Int[Cos[(c_.) + (d_.)*(x_)^(n_)]*((e_.)*(x_))^(m_.), x_Symbol] :> Dist[1/2, Int[(e*x)^m*E^(-(c*I) - d*I*x^n),
x], x] + Dist[1/2, Int[(e*x)^m*E^(c*I + d*I*x^n), x], x] /; FreeQ[{c, d, e, m, n}, x]

Rule 2218

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> -Simp[(F^a*(e + f*
x)^(m + 1)*Gamma[(m + 1)/n, -(b*(c + d*x)^n*Log[F])])/(f*n*(-(b*(c + d*x)^n*Log[F]))^((m + 1)/n)), x] /; FreeQ
[{F, a, b, c, d, e, f, m, n}, x] && EqQ[d*e - c*f, 0]

Rubi steps

\begin{align*} \int x^m \cos ^2\left (a+b x^n\right ) \, dx &=\int \left (\frac{x^m}{2}+\frac{1}{2} x^m \cos \left (2 a+2 b x^n\right )\right ) \, dx\\ &=\frac{x^{1+m}}{2 (1+m)}+\frac{1}{2} \int x^m \cos \left (2 a+2 b x^n\right ) \, dx\\ &=\frac{x^{1+m}}{2 (1+m)}+\frac{1}{4} \int e^{-2 i a-2 i b x^n} x^m \, dx+\frac{1}{4} \int e^{2 i a+2 i b x^n} x^m \, dx\\ &=\frac{x^{1+m}}{2 (1+m)}-\frac{2^{-\frac{1+m+2 n}{n}} e^{2 i a} x^{1+m} \left (-i b x^n\right )^{-\frac{1+m}{n}} \Gamma \left (\frac{1+m}{n},-2 i b x^n\right )}{n}-\frac{2^{-\frac{1+m+2 n}{n}} e^{-2 i a} x^{1+m} \left (i b x^n\right )^{-\frac{1+m}{n}} \Gamma \left (\frac{1+m}{n},2 i b x^n\right )}{n}\\ \end{align*}

Mathematica [A]  time = 0.51575, size = 129, normalized size = 0.91 \[ -\frac{x^{m+1} \left (e^{2 i a} (m+1) 2^{-\frac{m+1}{n}} \left (-i b x^n\right )^{-\frac{m+1}{n}} \text{Gamma}\left (\frac{m+1}{n},-2 i b x^n\right )+e^{-2 i a} (m+1) 2^{-\frac{m+1}{n}} \left (i b x^n\right )^{-\frac{m+1}{n}} \text{Gamma}\left (\frac{m+1}{n},2 i b x^n\right )-2 n\right )}{4 (m+1) n} \]

Antiderivative was successfully verified.

[In]

Integrate[x^m*Cos[a + b*x^n]^2,x]

[Out]

-(x^(1 + m)*(-2*n + (E^((2*I)*a)*(1 + m)*Gamma[(1 + m)/n, (-2*I)*b*x^n])/(2^((1 + m)/n)*((-I)*b*x^n)^((1 + m)/
n)) + ((1 + m)*Gamma[(1 + m)/n, (2*I)*b*x^n])/(2^((1 + m)/n)*E^((2*I)*a)*(I*b*x^n)^((1 + m)/n))))/(4*(1 + m)*n
)

________________________________________________________________________________________

Maple [F]  time = 0.126, size = 0, normalized size = 0. \begin{align*} \int{x}^{m} \left ( \cos \left ( a+b{x}^{n} \right ) \right ) ^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^m*cos(a+b*x^n)^2,x)

[Out]

int(x^m*cos(a+b*x^n)^2,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{x x^{m} +{\left (m + 1\right )} \int x^{m} \cos \left (2 \, b x^{n} + 2 \, a\right )\,{d x}}{2 \,{\left (m + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*cos(a+b*x^n)^2,x, algorithm="maxima")

[Out]

1/2*(x*x^m + (m + 1)*integrate(x^m*cos(2*b*x^n + 2*a), x))/(m + 1)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (x^{m} \cos \left (b x^{n} + a\right )^{2}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*cos(a+b*x^n)^2,x, algorithm="fricas")

[Out]

integral(x^m*cos(b*x^n + a)^2, x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{m} \cos ^{2}{\left (a + b x^{n} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**m*cos(a+b*x**n)**2,x)

[Out]

Integral(x**m*cos(a + b*x**n)**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{m} \cos \left (b x^{n} + a\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*cos(a+b*x^n)^2,x, algorithm="giac")

[Out]

integrate(x^m*cos(b*x^n + a)^2, x)